18. Events Quiz

Events Quiz

Events Quiz

Here's the code from the previous video:

jack.on("birthday", function(presents) {
  console.log("Buy a " + presents);
});

jack.trigger("birthday", "bicycle", "sword", "clarinet");

Consider the code above, what will be logged for Jack's present?

SOLUTION: Buy a bicycle

Solution

Events Solution